 	$(function () {
            $(".anti_search .anti_box").css({ "top": ((document.documentElement.clientHeight / 2) - 228) + "px", "left": ((document.documentElement.clientWidth / 2) - 344) + "px" });
            $(window).resize(function () {
                $(".anti_search .anti_box").css({ "top": ((document.documentElement.clientHeight / 2) - 228) + "px", "left": ((document.documentElement.clientWidth / 2) - 344) + "px" });
                $(".news_div .news_list .items").css({"width":+($(".news_div .news_list").width()/3)+"px"});
            });
            getTopHtml(1);//网站顶部
            //轮播
            $.zmdAjax("BannerList", "POST", { LanguageType: LanguageId, AdPositionId: 1}, false, function (obj) {
                if (obj.code == 0) {
                    if (obj.count > 0) {
                        $.each(obj.data, function (i, e) {
                            if (e.LinkUrl != "" || e.LinkUrl != null) {
                                $("#HomeTopBanner").append('<div class="slide_li"><a href="' + e.LinkUrl + '" target="_blank"><img src="' + e.BigAdImage + '" alt="" /></a></div>');
                            }
                            else {
                                $("#HomeTopBanner").append('<div class="slide_li"><img src="' + e.BigAdImage + '" alt="" /></div>');
                            }
                        });
                        //启用轮播
                        $(".home_banner_box").slide({ titCell: ".hd", mainCell: ".bd", effect: "fold", interTime: 5000, delayTime: 3000, autoPlay: true, autoPage: true, trigger: "click" });
                        var hdwidth = $(".home_banner_btn .hd").width();
                        $(".home_banner_btn .hd").css({ "left": (640 - (hdwidth / 2)) + "px" });
                    };
                }
                else {
                    getErrorMsg(obj.message);//错误提示
                }
            }, function (obj) {
                getErrorMsg(obj.message);//错误提示
            });
            //数字
            $.zmdAjax("BrandInfo", "POST", { LanguageType: LanguageId, AdPositionId: 1}, false, function (obj) {
                if (obj.code == 0) {
                    if (obj.count > 0) {
                        $.each(obj.data, function (i, e) {
                            if (i == 0) {
                                $("#HomeNumbers").append('<a class="nbox" href="CompanyIntro.html#publictab"><div class="txt">' + e.Describe1 + '</div><div class="num">' + e.Number + '</div><div class="txt">' + e.Describe2 + '</div></a>');
                            } else if (i == 1) {
                                $("#HomeNumbers").append('<a class="nbox" href="GreenProduct.html#publictab"><div class="txt">' + e.Describe1 + '</div><div class="num">' + e.Number + '</div><div class="txt">' + e.Describe2 + '</div></a>');
                            } else if (i == 2) {
                                $("#HomeNumbers").append('<a class="nbox" onclick="addbtnnum(102)"><div class="txt">' + e.Describe1 + '</div><div class="num">' + e.Number + '</div><div class="txt">' + e.Describe2 + '</div></a>');
                            } else if (i == 3) {
                                $("#HomeNumbers").append('<a class="nbox" href="ServiceIntro.html#publictab"><div class="txt">' + e.Describe1 + '</div><div class="num">' + e.Number + '</div><div class="txt">' + e.Describe2 + '</div></a>');
                            }
                        });
                    }
                }
                else {
                    getErrorMsg(obj.message);//错误提示
                }
            }, function (obj) {
                getErrorMsg(obj.message);//错误提示
            });
            //产品
            $.zmdAjax("HomeProductList", "POST", { LanguageType: LanguageId, ShowArea: 1 }, false, function (obj) {
                if (obj.code == 0) {
                    if (obj.count > 0) {
                        $.each(obj.data, function (i, e) {
                            var cssstr="margin-left:7px;margin-right:8px;";
                            if (i ==0) {
                                cssstr="margin-left:0px;margin-right:8px;";
                                getProjectImgs(e.Id);
                            }
                            if (i ==4) {
                                cssstr="margin-left:7px;margin-right:0px;";
                            }
                            var str = "";
                            str += '<a class="swiper-slide" style="' + cssstr + '" ids="' + e.Id + '" href="ProductsCenter.html?typeid=' + e.ProductTypeId + '#publictab">';
                            str += '<img src="' + e.BigImgUrl + '" alt="" />';
                            str += '<div class="onimg"><img src="' + e.SmallImgUrl + '" alt="" /></div>';
                            str += '</a>';
                            $("#ProductItem").append(str);
                        });
                        $("#ProductItem").append('<div class="clear"></div>');
                    }
                    else {
                        $("#ProductItem").append('<div class="link_more_btn">— 更多精彩内容即将上线，敬请关注 ！ —</div><div class="clear"></div>');
                    }
                }
                else {
                    getErrorMsg(obj.message);//错误提示
                }
            }, function (obj) {
                getErrorMsg(obj.message);//错误提示
            });
            //新闻
            $.zmdAjax("HomeNewsList", "POST", { LanguageType: LanguageId }, false, function (obj) {
                if (obj.code == 0) {
                    if (obj.count > 0) {
                        $.each(obj.data, function (i, e) {
                            var str = "";
                            str += '<div class="items">';
                            str += '<div class="box">';
                            str += '<div class="img">';
                            str += '<img src="' + e.BigImgUrl + '" />';
                            str += '<a class="link" onclick="addbtnnum(' + e.Id + ')"></a>';
                            str += '</div>';
                            str += '<div class="tit nowrap">' + e.Title + '</div>';
                            str += '<div class="time">' + e.PubDate + '</div>';
                            str += '</div>';
                            str += '<div class="back"></div>';
                            str += '</div>';
                            $("#HomeNewsList").append(str);
                            $(".news_div .news_list .items").css({ "width": +($(".news_div .news_list").width() / 3) + "px" });
                        });
                        $("#HomeNewsList").append('<div class="clear"></div>');
                    }
                    else {
                        $("#HomeNewsList").append('<div class="link_more_btn">— 更多精彩内容即将上线，敬请关注 ！ —</div><div class="clear"></div>');
                    }
                }
                else {
                    getErrorMsg(obj.message);//错误提示
                }
            }, function (obj) {
                getErrorMsg(obj.message);//错误提示
            });
            //获取省份
            getProvinceSelect();
            //切换省份
            var old1 = "";
            $("#ddlProvince .box").click(function () {
                if ($(this).attr("value") != "-1") {
                    if (old1 != $(this).attr("value")) {
                        $("#txtCity").text("请选择城市").attr("value", "-1");
                        old1 = $(this).attr("value");
                        getCitySelect(old1);
                    }
                } else {
                    $("#ddlCity").html("");
                }
            });
            //产品鼠标移上
            $(".pro_s_all #ProductItem .swiper-slide").hover(function () {
                $(this).children(".onimg").fadeOut(300);
                getProjectImgs($(this).attr("ids"));
            }, function () {
                $(this).children(".onimg").fadeIn(300);
            });
        });
        //获取产品轮播
        function getProjectImgs(id) {
            $.zmdAjax("ProductImagesList", "POST", { LanguageType: LanguageId, ProductId: id }, false, function (obj) {
                if (obj.code == 0) {
                    if (obj.data.length > 0) {
                        var str = "";
                        str += '<div class="flexslider"><ul class="slides" id="ProductImg">';
                        $.each(obj.data, function (i, e) {
                            str += '<li><a class="img" href="ProductsCenter.html?typeid=-1#publictab" style="display:block;"><img src="' + e.BigImgUrl + '" alt="" /></a></li>';
                        });
                        str += '</ul></div>';
                        $("#ProductImg").html(str);
                        $('#ProductImg .flexslider').flexslider({
                            animation: "slide",
                            direction:"horizontal",
                            easing:"swing"
                        });
                    }
                    else {
                        $("#ProductImg").html('<div class="link_more_btn">— 更多精彩内容即将上线，敬请关注 ！ —</div>');
                    }
                }
                else {
                    getErrorMsg(obj.message);//错误提示
                }
            }, function (obj) {
                getErrorMsg(obj.message);//错误提示
            });
        }
        //获取省份
        function getProvinceSelect() {
            $.zmdAjax("AreaList", "POST", {}, false, function (obj) {
                if (obj.code == 0) {
                    $.each(obj.data, function (i, e) {
                        $("#ddlProvince").append('<div class="box" value="' + e.AreaCode + '" onclick="ddloptionchek(this)">' + e.AreaName + '</div>');
                    });
                }
                else {
                    getErrorMsg(obj.message);//错误提示
                }
            }, function (obj) {
                getErrorMsg(obj.message);//错误提示
            });
        }
        //获取城市
        function getCitySelect(code) {
            $.zmdAjax("AreaList", "POST", { ProvinceCode: code }, false, function (obj) {
                if (obj.code == 0) {
                    $("#ddlCity").html("");
                    $.each(obj.data, function (i, e) {
                        $("#ddlCity").append('<div class="box" value="' + e.AreaCode + '" onclick="ddloptionchek(this)">' + e.AreaName + '</div>');
                    });
                }
                else {
                    getErrorMsg(obj.message);//错误提示
                }
            }, function (obj) {
                getErrorMsg(obj.message);//错误提示
            });
        }
        //门店查询
        function search_store() {
            var prvince = $("#txtProvince").attr("value"); var city = $("#txtCity").attr("value");
            location.href = "StoreQuery.html?prvince=" + prvince + "&city=" + city + "#publictab";
        }
        //播放视频
        function palyvideo() {
            $.zmdAjax("HomeVideoUrl", "POST", { LanguageType: LanguageId }, false, function (obj) {
                if (obj.code == 0) {
                    var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串  
                    var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1; //判断是否IE<11浏览器  
                    var isEdge = userAgent.indexOf("Edge") > -1 && !isIE; //判断是否IE的Edge浏览器  
                    var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1;
                    if (isIE) {
                        var reIE = new RegExp("MSIE (\\d+\\.\\d+);");
                        reIE.test(userAgent);
                        var fIEVersion = parseFloat(RegExp["$1"]);
                        if (fIEVersion <= 8) {
                            //var hasFlash = 0;
                            //if (document.all) {
                            //    var swf = new ActiveXObject('ShockwaveFlash.ShockwaveFlash');
                            //    if (swf) {
                            //        hasFlash = 1;
                            //        VSwf = swf.GetVariable("$version");
                            //    }
                            //} else {
                            //    if (navigator.plugins && navigator.plugins.length > 0) {
                            //        var swf = navigator.plugins["Shockwave Flash"];
                            //        if (swf) {
                            //            hasFlash = 1;
                            //            var words = swf.description.split(" ");
                            //            for (var i = 0; i < words.length; ++i) {
                            //                if (isNaN(parseInt(words[i]))) continue;
                            //            }
                            //        }
                            //    }
                            //}
                            //if (hasFlash == 1) {
                            //    window.open(obj.data);
                            //} else {
                            //    layer_box("温馨提示", "您没有安装flash，无法播放视频！");
                            //}
                            window.open(obj.data);
                        } else {
                            $("#showvideo").html('<video id="video" controls="controls" preload="auto" poster="" autoplay="autoplay" loop="loop">您的浏览器版本不支持 video 标签，不能播放视频，请升级浏览器。<source src="' + obj.data + '" type="video/mp4" /></video>'); $("#videobox").show();
                        }
                    } else if (isEdge) {
                        $("#showvideo").html('<video id="video" controls="controls" preload="auto" poster="" autoplay="autoplay" loop="loop">您的浏览器版本不支持 video 标签，不能播放视频，请升级浏览器。<source src="' + obj.data + '" type="video/mp4" /></video>'); $("#videobox").show();
                    } else if (isIE11) {
                        $("#showvideo").html('<video id="video" controls="controls" preload="auto" poster="" autoplay="autoplay" loop="loop">您的浏览器版本不支持 video 标签，不能播放视频，请升级浏览器。<source src="' + obj.data + '" type="video/mp4" /></video>'); $("#videobox").show();
                    } else {
                        $("#showvideo").html('<video id="video" controls="controls" preload="auto" poster="" autoplay="autoplay" loop="loop">您的浏览器版本不支持 video 标签，不能播放视频，请升级浏览器。<source src="' + obj.data + '" type="video/mp4" /></video>'); $("#videobox").show();
                    }
                }
                else {
                    getErrorMsg(obj.message);//错误提示
                }
            }, function (obj) {
                getErrorMsg(obj.message);//错误提示
            });
        }
        //关闭视频
        function close_home_video(obj) {
            $(obj).parent().parent().hide();
            $("#showvideo").html("");
        }
        //点击量
        function addbtnnum(id) {
            $.zmdAjax("AddInformationClinkCount", "POST", { Id: id }, false, function (obj) {
                if (obj.code != 0) {
                    getErrorMsg(obj.message);//错误提示
                } else {
                    window.open("NewsDetails.html?id=" + id);
                }
            }, function (obj) {
                getErrorMsg(obj.message);//错误提示
            });
        }
        

$(function () {
        $(window).resize(function () {
            $(".anti_box").css({ "top": ((document.documentElement.clientHeight / 2) - 333) + "px", "left": ((document.documentElement.clientWidth / 2) - 585) + "px" });
            $(".anti_box .closeico").css({ "top": ((document.documentElement.clientHeight / 2) - 355) + "px", "right": ((document.documentElement.clientWidth / 2) - 605) + "px" });
        });
        $(".anti_box").css({ "top": ((document.documentElement.clientHeight / 2) - 333) + "px", "left": ((document.documentElement.clientWidth / 2) - 585) + "px" });
        $(".anti_box .closeico").css({ "top": ((document.documentElement.clientHeight / 2) - 355) + "px", "right": ((document.documentElement.clientWidth / 2) - 605) + "px" });
        if ($("div").is('.slide_li')) {
            $(".home_banner_box").css({ "height": $("#HomeTopBanner .slide_li img").height() + "px" });
            setTimeout(function () {
                $(".home_banner_box").css({ "height": $("#HomeTopBanner .slide_li img").height() + "px" });
            }, 1000);
        }
    });